home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / dbtable.dxr / 00003_Max Min Layout Screen.ls < prev    next >
Encoding:
Text File  |  2000-01-18  |  2.3 KB  |  81 lines

  1. global gDBTableVarList
  2.  
  3. on ResizeLayOutScreen
  4.   MyObj = getaProp(gDBTableVarList, GetObjProp())
  5.   if the width of sprite 2 = 640 then
  6.     size = 1
  7.   else
  8.     size = 2
  9.   end if
  10.   SizeWindowArt(size)
  11.   SizeTable(size)
  12.   FirstandLastRectList = SizeScroll(size)
  13.   OnStageRect1 = getAt(FirstandLastRectList, 1)
  14.   OnStageRectLast = getAt(FirstandLastRectList, count(FirstandLastRectList))
  15.   EvalDisableScroll(MyObj)
  16.   ShowTableBorder(OnStageRect1, OnStageRectLast)
  17.   FootNoteLoc(OnStageRect1, OnStageRectLast)
  18.   SizeMIAW(size)
  19.   ScrollToStart(MyObj)
  20.   updateStage()
  21.   SetPostShowProps()
  22. end
  23.  
  24. on SizeWindowArt size
  25.   MyObj = getaProp(gDBTableVarList, GetObjProp())
  26.   SetPuppetState([1, 3], #contiguous, 1)
  27.   BorderRect = GetBorderRect(MyObj, size)
  28.   set the rect of sprite 2 to BorderRect
  29.   xMemberNum = the number of member getAt(["doc min", "doc max"], size)
  30.   set the member of sprite 3 to member(xMemberNum)
  31.   set the rect of sprite 3 to rect(0, 0, member(xMemberNum).width, member(xMemberNum).height)
  32.   controlList = GetControlList(MyObj)
  33.   repeat with rc in controlList
  34.     buttonLoc(rc, size)
  35.   end repeat
  36. end
  37.  
  38. on SizeTable size
  39.   MyObj = getaProp(gDBTableVarList, GetObjProp())
  40.   SpriteList = GetSpriteList(MyObj)
  41.   TableObj = GetTableObj(MyObj)
  42.   SizeTable(TableObj, size)
  43.   resetSelection(TableObj)
  44. end
  45.  
  46. on SizeScroll size
  47.   MyObj = getaProp(gDBTableVarList, GetObjProp())
  48.   TableObj = GetTableObj(MyObj)
  49.   OnStageRectList = GetOnStageRectList(TableObj)
  50.   rect1 = getAt(OnStageRectList, 1)
  51.   RectLast = GetBodyNewRect(TableObj)
  52.   ScrollNeedList = GetScrollNeeds(TableObj)
  53.   VerticalScrollLoc(rect1, RectLast)
  54.   HorizontalScrollLoc(rect1, RectLast)
  55.   return [rect1, RectLast]
  56. end
  57.  
  58. on PrepareFootNoteLoc TableRectList
  59.   MyObj = getaProp(gDBTableVarList, GetObjProp())
  60.   TableObj = GetTableObj(MyObj)
  61.   rect1 = getAt(TableRectList, 1)
  62.   RectLast = getAt(TableRectList, 2)
  63.   FootNoteLoc(rect1, RectLast)
  64. end
  65.  
  66. on SizeMIAW size
  67.   if count(the windowList) > 0 then
  68.     MyObj = getaProp(gDBTableVarList, GetObjProp())
  69.     windowName = (the activeWindow).name
  70.     MyRect = window(windowName).rect
  71.     if size = 1 then
  72.       l = getAt(MyRect, 1)
  73.       t = getAt(MyRect, 2)
  74.     else
  75.       l = getAt((the stage).rect, 1)
  76.       t = getAt((the stage).rect, 2) + 26
  77.     end if
  78.     window(windowName).rect = GetBorderRect(MyObj, size) + rect(l, t, l, t)
  79.   end if
  80. end
  81.